package ioc04;

import lombok.Data;

/**
 * Author：汤小洋
 * Date：2023-09-19 14:07
 * Description：<描述>
 */
public class SpringBean {
    private OtherBean otherBean;

    // public void setOtherBean(OtherBean otherBean) {
    //     this.otherBean = otherBean;
    //     System.out.println("SpringBean的setOtherBean方法.......");
    // }
    //
    // public SpringBean(){
    //     System.out.println("SpringBean的无参构造方法.......");
    // }

    public SpringBean(OtherBean otherBean) {
        System.out.println("SpringBean的带参构造方法.......");
        this.otherBean = otherBean;
    }

    @Override
    public String toString() {
        return "SpringBean{" +
                "otherBean=" + otherBean +
                '}';
    }
}
